package core.util;


import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.apache.log4j.Logger;

/**
 * <p>
 * Title: PropertiesUtil
 * </p>
 * <p>
 * Description: properties工具类
 * </p>
 * <p>
 * Copyright: Copyright (c) 2013
 * </p>
 * <p>
 * Company: hisunsray
 * </p>
 * <p>
 * Date: 2013-07-09
 * </p>
 * 
 * @version 1.0
 */
public class PropertiesUtil {
	
	public static final org.apache.log4j.Logger log = Logger.getLogger(PropertiesUtil.class);
	
	public PropertiesUtil(PropertiesUtil PropertiesUtil){
		
	}
	/**
	 * 获取配置信息
	 * @param str
	 * @return
	 */
	public static String getConf(String str){
		InputStream in=null;
		Properties prop = new Properties();
		try {
			in = PropertiesUtil.class.getResourceAsStream("/params.properties");
			prop.load(in);
		} catch (IOException e) {
			log.error(" *** properties error ***",e);
		}finally{
			IoUtils.close(in);  
		}
		return prop.getProperty(str);
		
	}
	
}
